﻿using static CyberU;
using static CyberU.UI;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Events;
using System.Linq;

public class TestButton : MonoBehaviour
{
    public Button button;
    public GameObject targetGameObject;
    public CanvasTransition canvasTransition;
    public void Awake()
    {
        button = AsComponent<Button>(this);
        // WaitUntilExists(canvasController);
        // Deloga(canvasController);
        // Delogb(canvasController.gameObject);
    }

    public void Start()
    {

        targetGameObject = canvasController.gameObject;
        // Delogc(button);
        AddToClick(target:button, func:() =>
        {
            Delogd();
            canvasTransition.StartTransition(
                new Vector3(5f, 0f, 0f),
                Quaternion.Euler(0f, 90f, 0f),
                0.7f);
        });
    }
}